home *** CD-ROM | disk | FTP | other *** search
- Path: locutus.rchland.ibm.com!usenet
- From: pstaite@vnet.ibm.com
- Newsgroups: comp.lang.c++
- Subject: Re: Getting the system time and date
- Date: 23 Jan 1996 14:14:08 GMT
- Organization: IBM OS/2 Device Driver Development Rochester, MN
- Message-ID: <4e2qfg$pdr@locutus.rchland.ibm.com>
- References: <tate.1.002C7F92@netwest.com> <4duk43$8ql@barnacle.iol.ie>
- Reply-To: pstaite@vnet.ibm.com
- NNTP-Posting-Host: warpone.rchland.ibm.com
- X-Newsreader: IBM NewsReader/2 v1.2
-
- In <4duk43$8ql@barnacle.iol.ie>, mat8033@iol.ie (Stuart Mc Bride) writes:
- >tate@netwest.com (Tate Griffin) wrote:
- >
- >>How do I get the current time and date from a PC using C++?
- >
-
- Wow that was complicated, why not just use this (which will work on most
- systems, not just the PC):
-
- #include<iostream.h>
- #include<time.h>
-
- int main() {
- cout << ctime( time( 0 ) ) << endl;
- return 0; }
-
-
- Phil Staite, team OS/2
- internet: pstaite@vnet.ibm.com internal: pstaite@rchland
-
-